package com.young.eventcoach.network;

import com.young.eventcoach.main.PropertyManager;
import com.young.eventcoach.upload.UploadParser;

public class UserInfoInsertRequest extends MultiPartRequest {

	public UserInfoInsertRequest(String uploadUrl,String id,String pw ,String userImagePath, String mMyImagePath) {
		if (uploadUrl == null) {
			throw new IllegalArgumentException("uploadUrl is Null");
		}
		this.urlString = uploadUrl;
		this.parser = new UploadParser();
		setName(id);
		setPassword(pw);
//		setRegistrationId();
		if(userImagePath != null){
			setFilePath(mMyImagePath);
		}
	}

	public void setName(String id) {
		addFormData("id",id);
	}
	
	public void setPassword(String pw) {
		addFormData("password",pw);
	}

	public void setFilePath(String filePath) {
		addFormData("userImage",filePath,"image/jpeg");
	}
	
//	public void setRegistrationId() {
//		String regid = PropertyManager.getInstance().getRegistrationId();
//		if (!regid.equals("")) {
//			addFormData("regid",regid);
//		}		
//	}

}
